<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>文档更新</title>
</head>
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>


<body>
	<s:debug />

	<s:form namespace="/" method="post">
		<label>标题：</label>
		<s:property value="#parameters.article_id" />
		<s:iterator value="#session.articles" id="article">
			<s:if test="#article.id==${#parameters.article_id}">

				<s:property value="#article.title"/>
			</s:if>
			<s:else>
				<s:property value="#article.id"/>
			</s:else>
		</s:iterator>

		<!-- 分割线 -->
		<div class="row">
			<div class="col-xs-12">
				<hr style="height: 5px; border: none; border-top: 5px ridge green;" />
			</div>
		</div>
		<!-- 加载编辑器的容器 -->
		<script id="container" name="article.context" type="text/plain">
            	<s:iterator value="#session.articles" id="article">
					<s:if test="#article.id==#parameters.article_id">
							<s:property value="#article.context"/>
					</s:if>
				</s:iterator>
        </script>

		<s:submit value="更新文档" />
	</s:form>

	<!-- 配置文件 -->
	<script type="text/javascript" src="UEditor/ueditor.config.js"></script>
	<!-- 编辑器源码文件 -->
	<script type="text/javascript" src="UEditor/ueditor.all.js"></script>
	<!-- 实例化编辑器 -->
	<script type="text/javascript">
		// 		var ue = UE.getEditor('container');
		var editor_a = UE.getEditor('container', {
			initialFrameHeight : 500,
			serverUrl : 'articleupdate.action'
		});
	</script>
</body>
</html>